package springcloud.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springcloud.service.RoleDepatmentService;
import springcloud.service.UserService;

import javax.annotation.Resource;

@RestController
@RequestMapping("/nacos")
public class UserController {

    @Resource
    private UserService userService;

    @Resource
    private RoleDepatmentService roleDepatmentService;


    @GetMapping("/consumerUser")
    public String test1() {
        String result = userService.test();
        return "User接口消费者端调用提供者端返回消息：" + result;
    }
    @GetMapping("/consumerRole")
    public String test2() {
        String result = roleDepatmentService.test();
        return "RoleDepatment接口消费者端调用提供者端返回消息：" + result;
    }


}
